import { MockMethod } from 'vite-plugin-mock';
import { resultSuccess } from "./util";

const systemInfo = {
    "ids": null,
    "businessNoList": null,
    "result": {
        "respCode": "SUCC",
        "msg": "交易成功hhhhhhhhh",
        "token": null,
        "userCode": null,
        "needSignature": false,
        "signature": null,
        "totalElements": 0,
        "totalPages": null,
        "list": [],
        "content": null,
        "async": false,
        "shareUser": null,
        "user": null,
        "weChatObject": {
            "id": 4,
            "systemCode": "S001",
            "domainUrl": "localhost",
            "wechatOriginalId": "gh_ed03f6c10316",
            "wechatAppId": "wx5d5e12bef4c434f5",
            "wechatSecret": null,
            "wechatTokenKey": "wanJiaYun",
            "wechatSubscribeUrl": "https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzUzMjk4NzM3NQ==&scene=126&subscene=0#wechat_redirect",
            "wechatMchId": "",
            "wechatPayKey": "",
            "miniProAppid": "",
            "miniProSecret": null,
            "enterpriseAppId": "",
            "enterpriseMailListAppId": "",
            "enterpriseMailListSecret": "",
            "enterpriseLoveSportAppId": "",
            "enterpriseLoveSportSecret": "",
            "createTime": "2018-08-27 14:22:48",
            "updateTime": "2023-07-11 14:55:02",
            "status": "1",
            "remark": "账户：1623263535@qq.com\n，管理员：周丹",
            "phoneAppId": "wx7dd388037c21624a",
            "phoneAppSecret": null,
            "wechatAppIdSbx": "wxa7613cb862aeaf08",
            "domainUrlSbx": "uatwanjia.ins10.cn"
        },
        "wechat": null,
        "companyObject": {
            "companyExpand": {
                "id": 16,
                "createDate": "2024-02-28 17:16:18",
                "updateDate": "2024-02-28 17:16:18",
                "systemCode": "S001",
                "xiaoHeFlag": "1",
                "xiaoHeRegisterVerify": "0",
                "xiaoHeSettlementType": "1",
                "xiaoHeSettlementSkip": "0",
                "desensitizationFlag": "0",
                "maxTaskSele": 4,
                "fourStore": "0",
                "commissionConfirm": "0",
                "orderPushedTaskFrom": "HELP,CPLUS,RENEWAL",
                "orderPushedExpireTime": null,
                "orderPushedWarnTime": null,
                "orderPushedNoticeCloseTime": 10,
                "changeType": "",
                "maxAliveNum": 0,
                "openBusiness": "0",
                "seleUserFlag": "1",
                "agentOnlyShowTotal": "0",
                "forceOauth": "1",
                "bindBankCard": "0",
                "idCardImgFlag": "2",
                "bindBankImgFlag": "0",
                "taxControlType": "1",
                "settleNoFlag": "0",
                "settleDocFlag": "0",
                "settleObject": "3",
                "supervisionFlag": "0",
                "supervisionMobileFlag": "0",
                "commissionClues": "",
                "commissionClues2": "",
                "commissionClues3": "",
                "groupType": "0",
                "configPowerFlag": "1",
                "payFlag": "0",
                "batchRepeatPolicy": "1",
                "supervisProtocolFlag": "0",
                "supervisTrainYear": 0,
                "supervisLicenseFlag": "0",
                "supervise": "0",
                "separateSettle": 0,
                "platformfunction": null,
                "customButFlag": "0",
                "customButData": "[]",
                "couponFlag": 1,
                "statistReportChart": "1",
                "checkRepeatBillFlag": "",
                "checkCompleteFlag": "",
                "checkPayeeAccount": "",
                "commissionVersion": "1",
                "showSpecialAccount": "1",
                "splitDocByPayDate": "0",
                "receiptPolicyNo": "0",
                "validateLicenseFlag": "0",
                "branchFlag": "1",
                "singleLimit": "0",
                "singleBalance": "1",
                "receiptFlag": "1",
                "agentCompanyFlag": "1",
                "defaultMlReferrerCode": null,
                "openAgentTask": "0",
                "customBuriedPoint": "1",
                "allBuriedPoint": "1",
                "companyFieldFlag": "1",
                "configJson": "{\"carHideInsure\":\"0\",\"showGiftBag\":\"0\",\"disConMonitor\":\"0\"}",
                "directCustomerRegisterFlag": "1",
                "workWechatPopUpFlag": "0",
                "inviteRepairFlag": null,
                "wechatLiveCodeAlone": "0",
                "chooseBankcardFlag": "1",
                "queryLevelFlag": "1",
                "commissionModule": "1,2",
                "createrPowerFlag": "1",
                "replaceRecalculate": "1",
                "ccType": "TCCC",
                "ccCallWay": "sdk",
                "factorNlpFlag": "1",
                "salesStatus": null,
                "salesMsg": null,
                "ocrPdf": "1",
                "deadline": "0",
                "addLevelAuth": "0",
                "upSystemCode": "",
                "upSystemQuery": "0",
                "upSystemDesensitization": "1",
                "autoOffer": "0",
                "topProfits": "1",
                "payAuthMobile": "",
                "floorSettle": "0",
                "mobileSettlementSequenceControl": "0",
                "showAccountStatus": "1",
                "downSystemCode": "",
                "useUpSystemAgentCommission": "0",
                "showZeroCommission": "1"
            },
            "id": 1,
            "systemCode": "S001",
            "systemName": "万家云服",
            "modelCode": "M001",
            "status": "1",
            "weChatAuth": "1",
            "weChatShare": "1",
            "weChatSubscribe": "0",
            "loginInsure": "1",
            "loginStore": "0",
            "loginJobCode": "1",
            "calculateType": "0",
            "cashWay": "1",
            "cashLimit": "2",
            "fastAccountType": "1",
            "fastAccount": "xb-cnp",
            "accountKey": "v56878yb9s6dwghm99999bc3tvp6abbb",
            "issue": "0,1",
            "placeSourceCore": "0040300006",
            "noPlaceSourceCore": "0040300666",
            "placeSource": "0040000006",
            "noPlaceSource": "0040000666",
            "personalAgentTaxRatio": 0.15,
            "remark": "利宝万家 平台1",
            "createTime": "2019-05-25 20:26:05",
            "updateTime": "2024-02-28 17:16:18",
            "logo": "/sticsale/upload/sftp/null/20191122150043112.png",
            "logoIco": "/sticsale/upload/sftp/null/20191122150051806.ico",
            "homePage": "",
            "about": "",
            "tel400": null,
            "pcTask": "0",
            "userTask": "0",
            "defaultHead": "",
            "inviteChanelAgent": "0",
            "inviteChanelQuasiAgent": null,
            "smsCodeLength": 6,
            "branchNo": "00000000",
            "branchName": "总公司",
            "wxQrCode": "",
            "bgInvite": "/sticsale/upload/channel/bgInvite.png",
            "bgAccept": "/sticsale/upload/channel/bgAccept.png",
            "bgInviteAgent": "",
            "bgAcceptAgent": "",
            "isBusiness": "1",
            "agentFlag": "1",
            "communityFlag": "1",
            "workWxFlag": "0",
            "noPlaceUpperQuota": 914000.00,
            "platformModeCode": "6",
            "defQueryUserType": null,
            "vinFindMove": "1",
            "vinFindPc": "1",
            "vinFindHelp": "1",
            "loginMould": "1",
            "loginLogo": "",
            "showDownApp": "1",
            "createUser": null,
            "updateUser": "terry.jiang",
            "maintainer": "[]",
            "province": "重庆市",
            "limitAreaName": "全国",
            "carConTime": null,
            "issues": null,
            "dataRole": null,
            "wechartList": null,
            "subMenuNameList": null,
            "settleLimitList": null,
            "openMobileHs": "0",
            "passForceModifySwitch": "1"
        },
        "integralObject": {
            "id": 10,
            "modelCode": "M001",
            "modelName": "万家云服",
            "ruleSwitch": "1",
            "is2cash": "1",
            "isStartLevelCommission": "1",
            "levelFee": "0",
            "showFee": "0",
            "levelFeeNum": 3,
            "isLayeredRate": "2",
            "showName": "宝豆",
            "unitName": "个",
            "period": 3,
            "rate": 100.0,
            "tbreback": "0",
            "updateTime": "2024-02-28 17:16:18",
            "updateCode": "terry.jiang",
            "feeRate": 0.0,
            "salersRate": 0.0,
            "referRate": 0.0,
            "superRate": 0.0,
            "remark": "",
            "commissionDataSource": "0",
            "appShowFee": "0",
            "serviceState": "1",
            "commissionShowName": "",
            "commissionUnitName": "",
            "showRate3": "0",
            "appShowRate3": "0"
        },
        "systemCode": "S001",
        "keepAutoLogin": null,
        "companyExpand": {
            "id": null,
            "createDate": null,
            "updateDate": null,
            "systemCode": null,
            "xiaoHeFlag": "0",
            "xiaoHeRegisterVerify": "0",
            "xiaoHeSettlementType": "1",
            "xiaoHeSettlementSkip": "0",
            "desensitizationFlag": "0",
            "maxTaskSele": null,
            "fourStore": "0",
            "commissionConfirm": "0",
            "orderPushedTaskFrom": null,
            "orderPushedExpireTime": null,
            "orderPushedWarnTime": null,
            "orderPushedNoticeCloseTime": null,
            "changeType": null,
            "maxAliveNum": null,
            "openBusiness": "0",
            "seleUserFlag": "0",
            "agentOnlyShowTotal": "0",
            "forceOauth": "0",
            "bindBankCard": "0",
            "idCardImgFlag": "0",
            "bindBankImgFlag": "0",
            "taxControlType": "1",
            "settleNoFlag": "0",
            "settleDocFlag": "0",
            "settleObject": "3",
            "supervisionFlag": "0",
            "supervisionMobileFlag": "0",
            "commissionClues": null,
            "commissionClues2": null,
            "commissionClues3": null,
            "groupType": "1",
            "configPowerFlag": "1",
            "payFlag": "0",
            "batchRepeatPolicy": "0",
            "supervisProtocolFlag": "0",
            "supervisTrainYear": null,
            "supervisLicenseFlag": "0",
            "supervise": "0",
            "separateSettle": 0,
            "platformfunction": null,
            "customButFlag": "0",
            "customButData": null,
            "couponFlag": 0,
            "statistReportChart": null,
            "checkRepeatBillFlag": null,
            "checkCompleteFlag": null,
            "checkPayeeAccount": null,
            "commissionVersion": "3",
            "showSpecialAccount": null,
            "splitDocByPayDate": "0",
            "receiptPolicyNo": null,
            "validateLicenseFlag": "1",
            "branchFlag": "1",
            "singleLimit": "0",
            "singleBalance": "2",
            "receiptFlag": "0",
            "agentCompanyFlag": "1",
            "defaultMlReferrerCode": null,
            "openAgentTask": null,
            "customBuriedPoint": "0",
            "allBuriedPoint": "0",
            "companyFieldFlag": "1",
            "configJson": null,
            "directCustomerRegisterFlag": null,
            "workWechatPopUpFlag": null,
            "inviteRepairFlag": null,
            "wechatLiveCodeAlone": "0",
            "chooseBankcardFlag": "0",
            "queryLevelFlag": "1",
            "commissionModule": "1,2",
            "createrPowerFlag": "1",
            "replaceRecalculate": "1",
            "ccType": "TCCC",
            "ccCallWay": "sdk",
            "factorNlpFlag": "1",
            "salesStatus": null,
            "salesMsg": null,
            "ocrPdf": null,
            "deadline": "0",
            "addLevelAuth": "0",
            "upSystemCode": "",
            "upSystemQuery": "0",
            "upSystemDesensitization": "1",
            "autoOffer": null,
            "topProfits": "0",
            "payAuthMobile": "",
            "floorSettle": "0",
            "mobileSettlementSequenceControl": "0",
            "showAccountStatus": "1",
            "downSystemCode": "",
            "useUpSystemAgentCommission": "0",
            "showZeroCommission": "1"
        },
        "refreshToken": false,
        "grayIndex": null,
        "baseSystemCode": "S001",
        "succ": true
    },
    "state": 0,
    "msg": "交易成功",
    "resCode": null,
    "token": null,
    "fileFlag": false,
    "needSignature": false,
    "repCode": null,
    "field": false,
    "success": true,
    "traceId": "2c1665bd5454ae1f"
}

const userInfo = {
    "result": {
        "openId": null,
        "wxMpUserDTO": {
            "openId": "ojiLG6Ag1LKehPk2qGnJo1wwn-0E",
            "nickName": "夜独醉",
            "sex": 0,
            "province": "",
            "city": "",
            "country": "",
            "headImgUrl": "https://thirdwx.qlogo.cn/mmopen/vi_32/PiajxSqBRaELVbKy4RKxXneMYLVykDTG2aYNWKBaveiaMGUaGowYP42hPlG2ukkZH3WgoheNJPIBibrHYYZGBoW5g/132",
            "privileges": null,
            "unionId": null,
            "addTime": "2021-11-03T03:28:11.000+0000",
            "updateTime": null,
            "token": null
        },
        "couponUserDTO": {
            "addTime": "2021-11-16T07:10:53.000+0000",
            "updateTime": "2021-11-16T07:10:53.000+0000",
            "addUserCode": "手机端注册",
            "updateUserCode": "手机端绑定",
            "couponUserId": "CUser0a51c8141929486cb461326cfbf5b710",
            "systemCode": "S001",
            "mobile": "13333333333",
            "idType": null,
            "idNumber": null,
            "userName": "李思",
            "ownerName": null,
            "email": null,
            "address": null,
            "userSource": null,
            "validStatus": null,
            "storeId": null,
            "wxOpenId": "ojiLG6Ag1LKehPk2qGnJo1wwn-0E",
            "wxUnionId": null,
            "storeName": null,
            "userCarList": null
        }
    },
    "state": 0,
    "msg": null,
    "resCode": null,
    "token": null,
    "fileFlag": false,
    "needSignature": false,
    "repCode": null,
    "success": true,
    "field": false
}

export default [
    {
        url: '/nol/wx/mp/loginByDebug/:openId',
        method: 'post',
        response: () => {
            return {
                "result": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2YWI2OWI1Ny01NWNhLTQwNzctODA4OS05YmNiMGViZjU3OTEiLCJpYXQiOjE2MzcyMTYwNDIsImlzcyI6InN5c3RlbSIsInN1YiI6Im9qaUxHNkFnMUxLZWhQazJxR25KbzF3d24tMEUiLCJleHAiOjE2Mzg5NDQwNDJ9.pZqqFsnwNsc9Yanr9BVcFxeCaRxrH--azcK_Dm6AqQ0",
                "state": 0,
                "msg": null,
                "resCode": null,
                "token": null,
                "fileFlag": false,
                "needSignature": false,
                "repCode": null,
                "success": true,
                "field": false
            }
        },
    },
    {
        url: '/customer/user/getUserInfo',
        method: 'post',
        response: () => {
            return userInfo;
        },
    },
    {
        url: '/auth/openapi/shareInit/initPlat',
        method: 'post',
        response: () => {
            console.log('mock===========')
            return systemInfo;
        },
    },
] as MockMethod[];
